package com.neu.swc.service.impl;

import com.neu.swc.dao.UserDao;
import com.neu.swc.service.UserService;
import org.springframework.beans.factory.InitializingBean;

public class UserServiceImpl implements UserService, InitializingBean {

    private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        System.out.println("userServiceImpl正在setUserDao");
        this.userDao = userDao;
    }

    public UserServiceImpl() {
        System.out.println("UserServiceImpl无参构造调用了");
    }

    public UserServiceImpl(String name) {
        System.out.println("UserServiceImpl有参构造调用了");
    }



    public void init() {
        System.out.println("UserServiceImpl初始化方法");
    }

    public void destroy() {
        System.out.println("UserServiceImpl销毁方法");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("UserServiceImpl.afterPropertiesSet");
    }

    @Override
    public void show() {
        System.out.println(userDao);
    }
}
